package com.csx.saas.merchant.tenant.dto;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import com.csx.basic.base.entity.Entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;
import com.csx.basic.base.entity.SuperEntity;
import lombok.Data;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import com.csx.saas.common.constant.DictionaryType;
import com.csx.saas.merchant.tenant.enumeration.TenantChannelEnum;
import com.csx.saas.merchant.tenant.enumeration.TenantStateEnum;
import java.io.Serializable;

/**
 * <p>
 * 实体类
 * 企业
 * </p>
 *
 * @author ChenSongXin
 * @since 2021-03-15
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = false)
@Builder
@ApiModel(value = "TenantUpdateDTO", description = "企业")
public class TenantUpdateDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @NotNull(message = "id不能为空", groups = SuperEntity.Update.class)
    private Long id;

    /**
     * 租户登录账户
     */
    @ApiModelProperty(value = "租户登录账户")
    @NotEmpty(message = "租户登录账户不能为空")
    @Length(max = 50, message = "租户登录账户长度不能超过50")
    private String account;
    /**
     * 租户登录密码
     */
    @ApiModelProperty(value = "租户登录密码")
    @Length(max = 64, message = "租户登录密码长度不能超过64")
    private String password;
    /**
     * 渠道\n#{SYSTEM:平台开通;REGISTER:注册}
     */
    @ApiModelProperty(value = "渠道\n#{SYSTEM:平台开通;REGISTER:注册}")
    private TenantChannelEnum channel;
    /**
     * 租户开始时间
     */
    @ApiModelProperty(value = "租户开始时间")
    private LocalDateTime startTime;
    /**
     * 有效期 
     * 为空表示永久
     */
    @ApiModelProperty(value = "有效期")
    private LocalDateTime expirationTime;
    /**
     * 企业简介
     */
    @ApiModelProperty(value = "企业简介")
    @Length(max = 255, message = "企业简介长度不能超过255")
    private String describe;
    /**
     * 状态\n#{NORMAL:正常;LOCKED:锁定;EXPIRE:到期}
     */
    @ApiModelProperty(value = "状态\n#{NORMAL:正常;LOCKED:锁定;EXPIRE:到期}")
    private TenantStateEnum state;
    /**
     * 版本编号
     */
    @ApiModelProperty(value = "版本编号")
    @Length(max = 20, message = "版本编号长度不能超过20")
    private String versionNbr;
}
